package com.zdb.order.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Setter
@Getter
@TableName("zdb_pms_address")
public class Address {
    @TableId("id")
    private int id;             //收货地址编号
    @TableField("pid")
    private int pid;            //省份编号
    @TableField("cid")
    private int cid;            //城市编号
    @TableField("did")
    private int did;            //区县编号
    @TableField("school_address")
    private String schoolAddress;//学校地址
    @TableField("building")
    private int building;        //楼栋
    @TableField("room_number")
    private String roomNumber;   //门牌号
    @TableField("remarks")
    private String remarks;      //备注信息
    @TableField("uid")
    private int uid;             //（关系映射user表）用户编号
    @TableField("active")
    private int active;         //标记是否默认选择此地址
    @TableField("consignee")
    private String consignee;        //此收货地址用户姓名
    @TableField("phone")
    private String phone;        //此收货地址电话号码

    @TableField(exist = false)
    private String pAddress;    //实际省份名字
    @TableField(exist = false)
    private String cAddress;    //实际城市名字
    @TableField(exist = false)
    private String dAddress;    //实际地区名字
    @Override
    public String toString() {
        return "Address{" +
                "id=" + id +
                ", pid=" + pid +
                ", cid=" + cid +
                ", did=" + did +
                ", schoolAddress='" + schoolAddress + '\'' +
                ", building=" + building +
                ", roomNumber='" + roomNumber + '\'' +
                ", remarks='" + remarks + '\'' +
                ", uid=" + uid +
                ", active=" + active +
                ", consignee=" + consignee +
                ", phone=" + phone +
                ", pAddress=" + pAddress +
                ", cAddress=" + cAddress +
                ", dAddress=" + dAddress +
                '}';
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    public int getCid() {
        return cid;
    }

    public void setCid(int cid) {
        this.cid = cid;
    }

    public int getDid() {
        return did;
    }

    public void setDid(int did) {
        this.did = did;
    }

    public String getSchoolAddress() {
        return schoolAddress;
    }

    public void setSchoolAddress(String schoolAddress) {
        this.schoolAddress = schoolAddress;
    }

    public int getBuilding() {
        return building;
    }

    public void setBuilding(int building) {
        this.building = building;
    }

    public String getRoomNumber() {
        return roomNumber;
    }

    public void setRoomNumber(String roomNumber) {
        this.roomNumber = roomNumber;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public int getActive() {
        return active;
    }

    public void setActive(int active) {
        this.active = active;
    }

    public String getpAddress() {
        return pAddress;
    }

    public void setpAddress(String pAddress) {
        this.pAddress = pAddress;
    }

    public String getcAddress() {
        return cAddress;
    }

    public void setcAddress(String cAddress) {
        this.cAddress = cAddress;
    }

    public String getdAddress() {
        return dAddress;
    }

    public void setdAddress(String dAddress) {
        this.dAddress = dAddress;
    }

    public String getConsignee() {
        return consignee;
    }

    public void setConsignee(String consignee) {
        this.consignee = consignee;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }
}
